package cn.itsource.feignclient;

import cn.itsource.domain.User;
import cn.itsource.feignclient.clientfactory.UserFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(value = "user-server",fallbackFactory = UserFeignClientFallBack.class)
@RequestMapping("/user")
public interface UserFeignClient {

    @GetMapping("/{id}")
    public User getUser(@PathVariable("id") Long id);
}
